global keepers2010 ""


genl yr=2010
global keepers2010 $keepers2010 yr

genl income3=VU10_V7045
recode income3 1 2 = 0 3 = 1 4 5 = 2 9999 . = .
global keepers2010 $keepers2010 income3

*genl pid_ce=(pipa==2 & pisa==1)
*replace pid_ce=. if (pipa==. | pipa>8888)
gen pid_ce = 1 if VU10_V7022 == 2
replace pid_ce = 0 if pid_ce == . & VU10_V7022 != .
global keepers2010 $keepers2010 pid_ce

gen pid_gov = pid_ce
global keepers2010 $keepers2010 pid_gov

*genl vote=v268
*replace vote=v900 if v268==9995
gen vote = 1 if VU10_V345 == 1
replace vote = 0 if vote == . & VU10_V345 != .

*genl vote_ce=vote==2
*replace vote_ce=. if vote>22
gen vote_ce = 1 if VU10_V346 == 2
replace vote_ce = 0 if vote_ce == . & VU10_V346 != .
global keepers2010 $keepers2010 vote_ce

genl vote_gov=vote_ce
global keepers2010 $keepers2010 vote_gov


genl gpi=VU10_V11
recode gpi .=2.5
replace gpi=abs(gpi-4)/3
global keepers2010 $keepers2010 gpi

genl socref=VU10_V845
recode socref 8888=2.5 9996=2.5 9998=2.5
replace socref=abs(socref-4)/3
global keepers2010 $keepers2010 socref

*genl degree=v772
*recode degree 10/11=1 1/9 8888=0
gen degree = 1 if VU10_V1116 == 11 | VU10_V1116 == 12
replace degree = 0 if degree == . & VU10_V1116 != .
global keepers2010 $keepers2010 degree


// Class/occupation

gen class_reho_3cat_strata = VU10_V7039
recode class_reho_3cat_strata 1=1 2=1 3=2 4=2 5=1 6=2 7=2 8=. 8888/9999=.
replace class_reho_3cat_strata = . if class_reho_3cat_strata > 40
label variable class_reho_3cat_strata "Social class (3 cats.): higher value is higher class"
*label define LblClassGrade 1 "A: (Higher man.; prof." 2 "B: Lower man.; admin." 3 "C1A: Skilled; supervis. non-manu." 4 "C1B: Lower non-manu." 5 "C2: Skilled manu." 6 "D: Unskilled manu."
*label values class_head_grade LblClassGrade
global keepers2010 $keepers2010 class_reho_3cat_strata

gen male = VU10_V7030
recode male 1=1 2=0
global keepers2010 $keepers2010 male

gen married = VU10_V1125
recode married 1=1 2/4=0 8888=. 9998=.
global keepers2010 $keepers2010 married

gen unionmem_resp = VU10_V1117
recode unionmem_resp 1=1 5=0 9998=.
global keepers2010 $keepers2010 unionmem_resp

*gen unionmem_spou = v259
*recode unionmem_spou 1/4=1 .=0
*global keepers1979 $keepers1979 unionmem_spou



// Pascal/SM moderators

